/**
 * \file Image.cpp
 * \brief Image definition class
 * \author Edouard ROGE
 * \date 16 October 2012
 */

#include "Image.h"

Image::Image()
: m_iWidth(0), m_iHeight(0)
{

}

Image::Image(uint32 _iWidth, uint32 _iHeight)
: m_iWidth(_iWidth), m_iHeight(_iHeight)
{

}

Image::Image(const String & _path)
: m_iWidth(0), m_iHeight(0)
{

}

Image::Image(const URI & _uri)
: m_iWidth(0), m_iHeight(0)
{

}

Image::Image(const Image & _image)
: m_iWidth(_image.m_iWidth), m_iHeight(_image.m_iHeight)
{

}

Image::~Image()
{

}

uint32 Image::GetWidth() const
{
	return m_iWidth;
}

uint32 Image::GetHeight() const
{
	return m_iHeight;
}

const Color & Image::operator()(uint32 i, uint32 j)const
{
	return m_Pixels[i*m_iHeight+j];
}

Color & Image::operator()(uint32 i, uint32 j)
{
	return m_Pixels[i*m_iHeight+j];
}

error Image::SaveToPNG(const URI & _uri) const
{
	return errOK;
}

error Image::LoadFromFile(const URI & _uri)
{
	return errOK;
}
